package sort

func SelectionSort(arr []int) {
	for i := range arr {
		minValue := arr[i]
		minIndex := i
		for j := i + 1; j < len(arr); j++ {
			if minValue > arr[j] {
				minValue = arr[j]
				minIndex = j
			}
		}
		arr[i], arr[minIndex] = minValue, arr[i]
	}
}
